Managing infectious forwarded messages

ABSTRACT

Systems and methods for managing forwarded infectious messages are provided. Managing electronic message comprises receiving a message, forwarding the message, determining that the forwarded message is infectious after the message has been forwarded and preventing the infectious forwarded message from spreading.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation and claims the priority benefit ofU.S. patent application Ser. No. 11/895,519 filed Aug. 24, 2007 andtitled “Managing Infectious Forwarded Messages,” which is a division ofand claims priority to U.S. patent application Ser. No. 11/156,373 filedJun. 16, 2005 and titled “Managing Infectious Messages,” now U.S. Pat.No. 7,343,624, which claims priority to U.S. provisional patentapplication No. 60/587,839 filed Jul. 13, 2004 and titled “DetectingMalicious Message on Day Zero,” the disclosures of which areincorporated herein by reference.

BACKGROUND OF THE INVENTION

Computer viruses and worms are often transmitted via electronicmessages. An infectious message usually comes in the form of an e-mailwith a file attachment, although other forms of infection are possible.Attackers have exploited many protocols that exchange electronicinformation, including email, instant messaging, SQL protocols, HyperText Transfer Protocols (HTTP), Lightweight Directory Access Protocol(LDAP), File Transfer Protocol (FTP), telnet, etc. When the attachmentis opened, the virus executes. Sometimes the virus is launched through alink provided in the email. Virus or worm attacks can cause considerabledamage to organizations. Thus, many anti-virus solutions have beendeveloped to identify viruses and prevent further damage. Currently,most anti-virus products use virus signatures based on known viruses foridentification. Such systems, however, often do not protect the networkeffectively during the time window between a virus' first appearance andthe deployment of its signature. Networks are particularly vulnerableduring this time window, which is referred to as “time zero” or “dayzero”. For a typical anti-virus system to function effectively, itusually requires viruses to be identified, their signatures developedand deployed. Even after the system adapts after an outbreak, time zerothreat can sometimes re-immerge as the virus mutates, rendering the oldsignature obsolete.

One approach to time zero virus detection is to use a content filter toidentify and quarantine any message with a potentially executableattachment. This approach is cumbersome because it could incorrectlyflag attachments in Word, Excel and other frequently used documentformats even if the attachments are harmless, resulting in high rate ifmisidentification (also referred to as false positives). Furthermore,the approach may not be affective if the virus author disguises thenature of the attachment. For example, some virus messages ask therecipients to rename a .txt file as .exe and then click on it. Sometimesthe virus author exploits files that were not previously thought to beexecutable, such as JPEG files. Therefore, it would be useful to have abetter time zero detection technique. It would also be desirable if thetechnique could detect viruses more accurately and generate fewer falsepositives.

SUMMARY OF THE CLAIMED INVENTION

Systems and methods of the present invention provide for managinginfectious forwarded messages.

In a first claimed embodiment, a method of managing messages includes astep of receiving a first message over a network at a network interface.The first message includes an attachment file having a file name and anembedded bit pattern. The method includes executing instructions storedin memory that, when executed, determine that the attachment file isexecutable based on the embedded bit pattern and determine that theattachment file is a text file based on the file name. The executedinstructions further store a copy of the first message in memory basedon the disparity between the determination that the attachment file isexecutable and the determination that the attachment file is a textfile. The method includes transmitting the first message over thenetwork to a mail server and receiving a second message over the networkat the network interface. The method further includes comparing thesecond message to the copy of the transmitted first message stored inmemory, deleting the second message from a local send queue, and sendinga cancellation request concerning the transmitted first message to themail server. The deletion and cancellation request steps occurautomatically when the second message matches the copy of thetransmitted first message in memory.

In a second claimed embodiment, an electronic message management systemincludes a network interface, a memory that stores instructions, and aprocessor communicatively coupled to the memory and the networkinterface. The network interface receives a first message over anetwork. The first message includes an attachment file having a filename and an embedded bit pattern. The network interface transmits thefirst message over the network to a mail server and receives a secondmessage over the network at the network interface after transmitting thefirst message to the mail server. When the instructions stored in memoryare executed by the processor, the processor determines that theattachment file of the first message is executable based on the embeddedbit pattern and determines that the attachment file of the first messageis a text file based on the file name. The processor stores a copy ofthe first message in memory based on the disparity between thedetermination that the attachment file is executable and thedetermination that the attachment file is a text file. The processorfurther compares the second message received after transmission of thefirst message to the copy of the transmitted first message stored inmemory. The processor then automatically deletes the second message froma local send queue and automatically sends a cancellation requestconcerning the transmitted first message to the mail server when thesecond message matches the copy of the transmitted first message inmemory.

In a third claimed embodiment, a non-transitory computer readablestorage medium includes a computer program that is executable by aprocessor to perform a method of managing messages. The method ofmanaging messages includes a step of analyzing a first message receivedover a network at a network interface. The first message includes anattachment file having a file name and an embedded bit pattern.Analyzing the first message includes determining that the attachmentfile is executable based on the embedded bit pattern and determiningthat the attachment file is a text file based on the file name. Themethod further includes storing a copy of the first message in memorybased on the disparity between the determination that the attachmentfile is executable and the determination that the attachment file is atext file. The method includes transmitting the first message over thenetwork to a mail server and then comparing a second message receivedover the network at the network interface to the copy of the transmittedfirst message stored in memory. The method further includes a step ofautomatically deleting the second message from a local send queue andautomatically sending a cancellation request concerning the transmittedfirst message to the mail server when the second message matches thecopy of the transmitted first message in memory.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 is a system diagram illustrating an embodiment of a messagedelivery system.

FIG. 2 is a flowchart illustrating a process embodiment for detectinginfectious message.

FIG. 3 is a flowchart illustrating the implementation of the individualmessage analysis according to some embodiments.

FIG. 4 is a flowchart illustrating an embodiment of traffic analysis.

FIG. 5 is a flowchart illustrating another embodiment of trafficanalysis.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess, an apparatus, a system, a composition of matter, a computerreadable medium such as a computer readable storage medium or a computernetwork wherein program instructions are sent over optical or electroniccommunication links. In this specification, these implementations, orany other form that the invention may take, may be referred to astechniques. A component such as a processor or memory described as beingconfigured to perform a task includes both a general component that istemporarily configured to perform the task at a given time or a specificcomponent that is manufactured to perform the task. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Detecting infectious messages is disclosed. Analysis of individualcharacteristics of messages is performed in some embodiments todetermine whether the message is suspicious. If a message is deemedsuspicious, it is determined whether a similar message has been notedpreviously as possibly suspicious. If a similar message has beenpreviously noted, the message is classified according to its individualcharacteristics and its similarity to the noted message. In someembodiments, if a message that was forwarded is later found to beinfectious, the infectious message is reported to human or machineagents for appropriate action to take place.

FIG. 1 is a system diagram illustrating an embodiment of a messagedelivery system. In this example, message forwarding device 102 may beimplemented as a mail server or gateway or other appropriate device. Themessage forwarding device is configured to forward messages received onits input interface. As used herein, forwarding includes sending amessage to email servers or gateways, networking devices, email clientsof individual recipients, or any other appropriate locations in themessage's path of flow. Some of the messages to be forwarded may beinfectious (i.e. containing viruses, worms or other items that may causeunwanted behavior on the recipient's device and/or the network). In thisexample, an infectious message detection mechanism 104 cooperates withthe message forwarding device to identify the virus and preventsinfectious messages from further spreading. In some embodiments, thevirus detection mechanism is implemented as software, firmware,specialized hardware or any other appropriate techniques on the messageforwarding device. In some embodiments, the detection mechanism isimplemented on a separate device.

FIG. 2 is a flowchart illustrating a process embodiment for detectinginfectious messages. Process 200 may be implemented on a messageforwarding device, a standalone device, or as a part of another networkmonitoring/security device for any other appropriate device systems. Inthis example, an individual message analysis is performed initially(202). As will be shown in more details below, the individual messageanalysis evaluates the intrinsic characteristics of the message,determines the probability of the message being infectious, andclassifies the message. In some embodiments, the message is classifiedas legitimate, suspicious or infectious based on the probability. Themessage is determined to be legitimate if the probability is below alegitimate threshold, infectious if the probability exceeds aninfectious threshold, and suspicious if the probability is somewherebetween the two thresholds. Other evaluations and classificationtechniques are used in different embodiments.

In the process shown, if a message is determined to be legitimate, themessage is forwarded to the appropriate recipient (204). If the messageis determined to be infectious, the message is treated as appropriate(206). In some embodiments, the message is quarantined or deleted fromthe delivery queue. If a message is deemed to be suspicious, a trafficanalysis is performed on the suspicious message (208). The trafficanalysis identifies any traffic spike in the e-mail message stream thatis consistent with the pattern of a virus outbreak. Details of thetraffic analysis are described below. In this example, analysis of amessage in the context of all message traffic yields another probabilityof the message being infectious, and classifies the suspicious messageas either legitimate or infectious according to the probability.Legitimate messages are processed normally and forwarded to theirdestinations (204). Infectious messages are treated appropriately (206).Other classifications are also possible. The order of the analyses maybe different in some implementations and some embodiments perform theanalysis in parallel. In some embodiments, each analysis is performedindependently.

FIG. 3 is a flowchart illustrating the implementation of the individualmessage analysis according to some embodiments. In this example, process202 initiates when a message is received (302). The message is thensubmitted to a plurality of tests configured to examine thecharacteristics of the message and detect any anomalies. After eachtest, the probability of the message being infectious is updatedaccording to the test result (318). In some embodiments, the weight ofdifferent test results in calculating the probability may vary.

It is then determined whether the probability exceeds the threshold forthe message to be deemed infectious (320). If so, the message isconsidered infectious and may be quarantined, deleted from send queue,or otherwise appropriately handled. If, however, the probability doesnot exceed the threshold, it is determined whether more tests areavailable (322). If so, the next available test is applied and theprocess of updating probability and testing for threshold is repeated.If no more tests are available, the probability is compared to thethreshold required for a legitimate message (324). If the probabilityexceeds the legitimate threshold, the message is deemed to besuspicious. Otherwise, the tests indicate that the message islegitimate. The classification of the message is passed on to the nextroutine. According to process 200, depending on whether the message islegitimate, suspicious or infectious, the next routine may forward themessage, perform traffic analysis on the message, or treat the messageas infectious.

Examples of the tests used in the individual message analysis includesignature matching tests (304), file name tests (306), character tests(308), bit pattern tests (310), N-gram tests (312), bit pattern test(314), and probabilistic finite state automata (PFSA) tests (316). Thetests may be arranged in ay appropriate order. Some tests maybe omittedand different tests may be used.

Some of the tests analyze the intrinsic characteristics of the messageand/or its attachments. In the embodiments shown, the signature matchingtest (304) compares the signature of the message with the signatures ofknown viruses. The test in some embodiments generates a probability on asliding scale, where an exact match leads to a probability of 1, and aninexact match receives a probability value that depends on the degree ofsimilarity.

The file name test (306) examines the name of the attachment anddetermines if there is anomaly. For example, a file name such as “readme.txt.exe” is highly suspicious since it would appear that the senderis attempting to misrepresent the nature of the executable and pass thefile off as a text file.

FIG. 1 illustrates a system 100 for a transaction process between a user101 and a vendor 104. The system 100 includes user experience system102, vendor strategy system 103, and interaction system 107. Each ofsystems 102, 103, and 107 may communicate directly with each other, forexample wired channels 105 and 106, or indirectly over network 120.Network 120 may include one or more private networks, public networks,LANs, WANs, the Internet, an intranet, a Wi-Fi network, cellularnetwork, or a combination of these networks.

The bit pattern test (310) examines certain portions of the file anddetermines whether there is anomaly. Many files contain embedded bitpatterns that indicate the file type. The magic number or magic sequenceis such a bit pattern. For example, an executable file includes aparticular bit pattern that indicates to the operating system that thefile is an executable. The operating system will execute any file thatstarts with the magic sequence, regardless of the file extension. If anattachment has an extension such as .txt or .doc that seems to indicatethat the file is textual in nature, yet the starting sequence in thefile contains the magic sequence of an executable, then there is a highprobability that the sender is attempting to disguise an executable as atext document. Therefore, the attachment is highly suspicious.

Some of the tests such as N-gram (312) and PFSA (314) measure thedeviation of the received message from a baseline. In this example, thebaseline is built from a collection of known good messages. An N-grammodel describes the properties of the good messages. The N-gram model isa collection of token sequences and the corresponding probability ofeach sequence. The tokens can be characters, words or other appropriateentities. The test compares the N-gram model to an incoming message toestimate the probability that a message is legitimate. The probabilitiesof the N-gram sequences of the incoming messages can be combined withthe probabilities of the N-gram sequences of the baseline model usingany of several methods. In some embodiments, the N-gram test comparesthe test result with a certain threshold to determine the legitimacy ofa message. In some embodiments, a message deemed legitimate by theN-gram test is not subject to further testing, thus reducing falsepositive rate. In some embodiments, a message found to be legitimate bythe N-gram test is further tested to ascertain its true legitimacy.

In the example shown, the PFSA test (314) relies on a model that isbuilt from a set of known good messages. The model describes theproperties of legitimate messages. The model includes a plurality oftoken such as characters and words, and the probabilities associatedwith the tokens. The test estimates the probability that a particularmessage that includes a sequence of tokens can be generated by themodel. In some embodiments, similar to the N-gram test, the test resultis compared with a certain threshold to determine the legitimacy of amessage. In some embodiments, a message deemed legitimate by the PFSAtest is not subject to further testing to avoid false positives. In someembodiments, a message found to be legitimate by the PFSA test isfurther tested to ascertain its true legitimacy.

In some embodiments, information about previously received messages iscollected and used to identify an increase in the number of similar andpotentially suspicious messages. Messages are clustered to establish astatistical model that can be used to detect similar messages. The datacollected may include one or more of the following: time of receipt, therecipients, number of recipients, the sender, size of the attachment,number of attachments, number of executable attachments, file name, fileextension, file type according to the starting sequence of the filebinary, etc. The characteristics of an incoming message are compared tothe model to determine whether similar messages have been notedpreviously. A traffic spike in similar messages that were previouslynoted as potentially suspicious indicates the likelihood of a virusoutbreak.

In some embodiments, traffic patterns are analyzed on a global networklevel. In other words, the analysis may monitor all the messages routedthrough an internet service provider and note the suspicious ones. Insome embodiments, the traffic patterns are analyzed locally. Forexample, messages on a local network or on different subnets of a localnetwork may be analyzed separately. In some embodiments, a combinationof global and local analyses is used.

In local traffic analysis, different subnets can have different trafficpatterns. For example, within a corporation, the traffic on theengineering department subnet may involve a large number of executablesand binary files. Thus, absent other indicators, executables and binaryattachments will not always trigger an alarm. In contrast, the trafficpattern of the accounting department may mostly involve text documentsand spreadsheets, therefore an increase in binary or executableattachments would indicate a potential outbreak. Tailoring trafficanalysis based on local traffic can identify targeted attacks as well asvariants of old viruses.

FIG. 4 is a flowchart illustrating an embodiment of traffic analysis.Process 208 may be performed after the individual message analysis asshown in process 200, before the individual message analysis, incombination with other analysis, or independently. Process 208 initiateswhen a message is received (402). The characteristics of the message arecompared to the characteristics of previously stored suspicious message(404). In some embodiments, the system collects suspicious messagesresulting from other tests such as the ones in the individual messageanalysis shown in FIG. 3.

It is then determined whether the message is similar to the previousstored messages (406). If the message is not similar to any of thepreviously stored suspicious messages, a low probability ofinfectiousness is assigned. If, however, the message is similar toprevious stored suspicious messages, information associated with thereceived message is also stored and statistical model is updatedaccordingly (408). It is then determined whether the number of suchsimilar and suspicious messages has exceeded a predefined threshold(410). If not, the message is not classified as infectious at thispoint, although a higher probability may be assigned to it. If the totalnumber of such suspicious messages has exceeded the threshold, it islikely that the message is indeed infectious and should be appropriatelytreated. For example, consider the case where the threshold number isset to 5, and there are already 4 instances of suspicious messages withexecutable attachments having the same extension and similar size. Whena fifth message arrives with similar sized executable attachments withthe same extension, the message will be classified as infectious. Byselecting an appropriate threshold value, infectious messages can bedetected and prevented without a major outbreak.

Sometimes the system may initially find a message to be legitimate ormerely suspicious and forward the message to its destination. Later asmore information becomes available, the system may find the message tobe infectious. FIG. 5 is a flowchart illustrating another embodiment oftraffic analysis. Process 500 may be performed independently or inconjunction with other types of message analyses. In the example shown,a message is received (502). The message is initially determined to belegitimate and forwarded (504). Sometime after he message has beenforwarded, the forwarded message is determined to be infectious (506). Amessage may be found as infectious according to any appropriate messageanalysis techniques, including those described in this specification. Insome embodiments, information pertaining to the forwarded message isoptionally stored in memory, on disk or in other forms of storage mediumso that it can be used for the analysis. Again, consider the examplewhere the threshold number in the traffic analysis is set to 5 and 4similar messages have been received. Although these 4 messages are notedas suspicious, because the threshold is not met the messages are stillforwarded. The characteristics of the suspicious messages are stored.When a similar fifth message is received, its characteristics arecompared to the characteristics of the four previously noted messages.N-gram, PFSA or other appropriate techniques can be used in thecomparison. The analysis shows that the number of similar and suspiciousmessages meets the threshold. Therefore, the fifth message isinfectious, as are the four previously noted and forwarded messages.

Once an already forwarded message is deemed infectious, measures aretaken to prevent the infectious forwarded message from spreading (508).In the example shown above, the system will take actions to keep the 4instances of previously forwarded message from being opened or resent bytheir recipients. Additionally, the system will not forward the fifthmessage. In some embodiments, the system reports the finding to thesystem administrator, the recipient, and/or other users on the networkto prevent the previously forwarded infectious message from furtherspreading. Warning messages, log messages or other appropriatetechniques may be used. In some embodiments, the system generates acancellation request to a forwarding agent such as the mail server,which will attempt to prevent the message from being forwarded bydeleting them from the send queue, moving the messages into a locationto be quarantined or any other appropriate action.

Detecting and managing infectious messages have been disclosed. Byperforming individual message analysis and/or traffic analysis,infectious messages can be more accurately identified at time zero, andinfectious messages that initially escaped detection can be lateridentified and prevented from further spreading.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A method of managing messages, the methodcomprising: receiving a first message over a network at a networkinterface, the first message including an attachment file having a filename and an embedded bit pattern; executing instructions stored inmemory, wherein execution of the instructions by a processor: determinesthat the attachment file is executable based on the embedded bitpattern, determines that the attachment file is a text file based on thefile name, stores a copy of the first message in memory based on thedisparity between the determination that the attachment file isexecutable and the determination that the attachment file is a textfile, and transmits the first message over the network to a mail server;receiving a second message over the network at the network interface;and executing instructions stored in memory, wherein execution of theinstructions by a processor: compares the second message to the copy ofthe transmitted first message stored in memory, deletes the secondmessage from a local send queue, and sends a cancellation requestconcerning the transmitted first message to the mail server, thedeletion and cancellation request occurring automatically when thesecond message matches the copy of the transmitted first message inmemory.
 2. The method of claim 1, wherein further execution of theinstructions reports the match to a system administrator.
 3. The methodof claim 1, wherein further execution of the instructions reports thematch to a recipient of the first message.
 4. The method of claim 1,wherein further execution of the instructions reports the match to adesignated recipient of the second message.
 5. The method of claim 1,wherein further execution of the instructions quarantines the secondmessage.
 6. The method of claim 1, wherein the file name includes a .txtextension.
 7. The method of claim 1, wherein the file name includes a.doc extension.
 8. An electronic message management system, comprising:a network interface that: receives a first message over a network, thefirst message including an attachment file having a file name and anembedded bit pattern, transmits the first message over the network to amail server, and receives a second message over the network at thenetwork interface after transmitting the first message to the mailserver; a memory that stores instructions; and a processorcommunicatively coupled to the memory and the network interface, whereinexecution of the instructions stored in the memory by the processor:determines that the attachment file of the first message is executablebased on the embedded bit pattern, determines that the attachment fileof the first message is a text file based on the file name, stores acopy of the first message in memory based on the disparity between thedetermination that the attachment file is executable and thedetermination that the attachment file is a text file, compares thesecond message received after transmission of the first message to thecopy of the transmitted first message stored in memory, deletes thesecond message from a local send queue, and sends a cancellation requestconcerning the transmitted first message to the mail server, thedeletion and cancellation request occurring automatically when thesecond message matches the copy of the transmitted first message inmemory.
 9. The system of claim 8, wherein further execution of theinstructions reports the match to a system administrator.
 10. The systemof claim 8, wherein further execution of the instructions reports thematch to a recipient of the first message.
 11. The system of claim 8,wherein further execution of the instructions reports the match to adesignated recipient of the second message.
 12. The system of claim 8,wherein further execution of the instructions quarantines the secondmessage.
 13. The system of claim 8, wherein the file name includes a.txt extension.
 14. The system of claim 8, wherein the file nameincludes a .doc extension.
 15. A non-transitory computer readablestorage medium, the medium having a computer program embodied thereon,the program executable by a processor to perform a method of managingmessages, the method comprising: analyzing a first message received overa network at a network interface, the first message including anattachment file having a file name and an embedded bit pattern, whereinanalyzing the first message includes: determining that the attachmentfile is executable based on the embedded bit pattern, and determiningthat the attachment file is a text file based on the file name; storinga copy of the first message in memory based on the disparity between thedetermination that the attachment file is executable and thedetermination that the attachment file is a text file; transmitting thefirst message over the network to a mail server; comparing a secondmessage received over the network at the network interface to the copyof the transmitted first message stored in memory; deleting the secondmessage from a local send queue; and sending a cancellation requestconcerning the transmitted first message to the mail server, thedeletion and cancellation request occurring automatically when thesecond message matches the copy of the transmitted first message inmemory.
 16. The non-transitory computer readable storage medium of claim15, wherein the method further includes reporting the match to a systemadministrator.
 17. The non-transitory computer readable storage mediumof claim 15, wherein the method further includes reporting the match toa recipient of the first message.
 18. The non-transitory computerreadable storage medium of claim 15, wherein the method further includesreporting the match to a designated recipient of the second message. 19.The non-transitory computer readable storage medium of claim 15, whereinthe method further includes quarantining the second message.
 20. Thenon-transitory computer readable storage medium of claim 15, wherein thefile name includes either a .txt or .doc extension.